package com.jiyang.jyandroid;

import java.util.Calendar;

/**
 * Created by jy on 2016/11/18.
 * 公用工具类
 */

public class CommUtil {

    public static String GetDateStr() {
        Calendar c = Calendar.getInstance();
        int y = c.get(Calendar.YEAR);
        int m = c.get(Calendar.MONTH);
        int d = c.get(Calendar.DAY_OF_MONTH);
        int h = c.get(Calendar.HOUR_OF_DAY);
        int mi = c.get(Calendar.MINUTE);
        return String.valueOf(y) + "-" + String.valueOf(m) + "-" + String.valueOf(d) + " " + String.valueOf(h) + ":" + String.valueOf(mi);
    }
}
